package tblLSListner;


import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import pnlRestaurant.PnlResMain;


public class TMSLTafel implements ListSelectionListener {

	private PnlResMain prm;



	public TMSLTafel(PnlResMain PnlResMain) {
		this.prm = PnlResMain;
	}

	@Override
	public void valueChanged(ListSelectionEvent e) {
			if (!e.getValueIsAdjusting()) {
				int nr;
				int row = prm.getTblTafel().getSelectedRow();
				nr = (int) prm.getTblTafel().getValueAt(row, 0);
				
				System.out.println(nr);
				
				String STafelNaam = Integer.toString(nr);
				prm.getTxtTafelNummerR().setText(STafelNaam);
			
			}
	}}